package com.bestcem.xm.txtanls.grpc.service.param.topic;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import static com.bestcem.xm.common.core.constant.Constants.TEN;

/**
 * @author liheng
 * @version v1.0
 * @date 2021/5/20 19:46
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MoveTopicParam {

    /**
     * 话题id
     */
    @NotBlank(message = "话题id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "话题id格式错误")
    private String id;

    /**
     * 文本分析项目id(新增话题组并移动该话题时传值)
     */
    private String projectId;

    /**
     * 话题组名称（新增话题组并移动到该话题组时存在）
     */
    @Size(max = TEN, message = "名称长度不能超过10")
    private String groupName;

    /**
     * 话题组id(移动到的话题组id)
     */
    private String topicGroupId;
}
